package model

type Carousel struct {
	CarouselId   uint   `json:"carouselId" gorm:"type:int;primary_key;not null;autoIncrement"`
	CarouselUrl  string `json:"carouselUrl" gorm:"type:varchar(100);not null"`
	RedirectUrl  string `json:"redirectUrl" gorm:"type:varchar(100);not null"`
	CarouselRank uint   `json:"carouselRank" gorm:"type:int;not null"`
	IsDeleted    uint   `json:"isDeleted" gorm:"type:tinyint(4);not null"`
	CreateTime   Time   `json:"createTime" gorm:"type:datetime;not null;default:current_timestamp"`
	CreateUser   uint   `json:"createUser" gorm:"type:int;not null"`
	UpdateTime   Time   `json:"updateTime" gorm:"type:datetime;not null;default:current_timestamp"`
	UpdateUser   uint   `json:"updateUser" gorm:"type:int;not null"`
}

// TableName 自定义表明，不适用默认的mall_users
func (receiver Carousel) TableName() string {
	return "tb_newbee_mall_carousel"
}
